home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
ATOI.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
321 b
|
17 lines
/* atoi.c, from p.171 of Turbo C Bible */
/* Converts a string to an integer. */
#include <stdio.h>
#include <stdlib.h>
main(int argc, char **argv)
{
int value;
if(argc < 2)
{
printf("Usage: %s <value>\n", argv[0]);
}
else
{
value = atoi(argv[1]);
printf("Value entered = %d\n", value);
}
}